<style>
* {
  box-sizing: border-box;
}

html {
  font: 14px/1.4 Sans-Serif;
}

.contact-form-widget {
  width: 320px;
  float: left;
  margin: 20px;
}
.contact-form-widget > div {
  position: relative;
  overflow: hidden;
}
.contact-form-widget input, .contact-form-widget textarea {
  width: 100%;
  border: 2px solid gray;
  background: none;
  position: relative;
  top: 0;
  left: 0;
  z-index: 1;
  padding: 8px 12px;
  outline: 0;
}
.contact-form-widget input:valid, .contact-form-widget textarea:valid {
  background: white;
}
.contact-form-widget input:focus, .contact-form-widget textarea:focus {
  border-color: #6BCBCA;
}
.contact-form-widget input:focus + label, .contact-form-widget textarea:focus + label {
  background: #6BCBCA;
  color: white;
  font-size: 70%;
  padding: 1px 6px;
  z-index: 2;
  text-transform: uppercase;
}
.contact-form-widget label {
  transition: background 0.2s, color 0.2s, top 0.2s, bottom 0.2s, right 0.2s, left 0.2s;
  position: absolute;
  color: #999;
  padding: 7px 6px;
}
.contact-form-widget textarea {
  display: block;
  resize: vertical;
}

.contact-form-widget label {
  top: 2px;
  right: 100%;
  width: 100%;
  margin-right: -100%;
  bottom: 2px;
}
.contact-form-widget input:focus + label, .contact-form-widget textarea:focus + label {
  right: 0;
  margin-right: 0;
  width: 40%;
  padding-top: 5px;
}
.submit {
    width: 100%;
    text-align:center;    
    padding: 10px 0;
    float: none;
    clear: both;
    font-size: 20px;
    height: auto;
    text-transform: uppercase;
    font-weight: normal;
    background: #6BCBCA;
    cursor: pointer;
}
.submit:hover {
    background: grey;
}

</style>
<form class="contact-form-widget" action="mail.php" method="POST">  
  <div>
    <input id="name" name="name" type="text" required>
    <label for="name">Name</label>
  </div>
  <div>
    <input id="email" name="email" type="text" required>
    <label for="email">Email</label>
  </div>
  <div>
    <textarea id="message" name="message" required></textarea>
    <label for="message">Message</label>
  </div>
     <input type="submit" class="submit" value="Send">
</form>

